package com.example.demo.service.impl;

import com.example.demo.dao.IMenuDao;
import com.example.demo.entity.Menu;
import com.example.demo.service.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl implements IMenuService {

    @Autowired
    private IMenuDao menuDao;

    @Override
    public List<Menu> getMenu() {
        return menuDao.getMenu();
    }

    @Override
    public void insert(Menu menu) {
        menuDao.insert(menu);
    }

    @Override
    public void update(Menu menu) {
        menuDao.update(menu);
    }

    @Override
    public void delete(int id) {
        menuDao.delete(id);
    }

    @Override
    public Menu selectById(int id) {
        return menuDao.selectById(id);
    }

    @Override
    public List<Menu> selectAll() {
        return menuDao.selectAll();
    }
}
